1. Field of the Invention
This application relates to computers and computer operations, and more particularly to condition code stack architecture systems and methods used in computer systems.
2. Description of Related Art
The related art includes U.S. Pat. No. 5,517,628 xe2x80x9cComputer with Instructions that Use an Address Field to Select Among Multiple Condition Code Registers,xe2x80x9d granted to Gordon E. Morrison, Christopher B. Brooks, and Frederick G. Gluck of Biax Corporation, on May 14, 1996. As described in the ""628 patent, condition code register files are distinct from a computer""s general purpose register file. The condition code register file has a plurality of addressable condition code registers. The computer executes condition-setting instructions that produce condition code values for storage in condition code registers. Conditional branch instructions branch to a target based upon analysis of a condition code value from one of the condition code registers. The condition code registers are directly addressable by condition code address fields of the instructions. The contextual information of the condition code registers is stored as bits associated with the respective processor elements. These bits are used for branching and are the result of executing certain comparison and test instructions. In the ""628 patent, the processor has multiple sets of condition code registers. The processor""s arithmetic and logical operations alter a condition code register state, and that state is available even after execution of other arithmetic and logical operations. Further, the processor""s control transfer operations can specify which of the condition code registers is to be the basis for a jump. Unfortunately, use of a register file of condition codes requires complex management software, such as compiler software for example. This software is needed to manage which of the sets of condition codes will be used in each instruction. Additionally, the ""628 patent requires excessive bit processing in arithmetic, logical, and control transfer instructions to specify the identity of the required condition code register to be used with the applicable instruction. This consumes excessive instruction code space.
According to one embodiment of the present invention, a program status word in a computer system architecture includes condition codes stored in a selfmanaging stack which does not require management or compiler software for operational enablement. According to the present invention, predetermined bits in a control transfer instruction such as a conditional jump instruction identify the applicable condition code register to be used with a control transfer instruction. However, no bits need to be identified for arithmetic and logical instructions for use with the particular instructions, thereby saving considerable instruction code space. According to another embodiment of the present invention, a computer system includes a register file and an arithmetic logic unit (ALU) for reading data from said register file, and storing the results of processing read data in said register file, as well as storing in a condition code stack context data indicative of the results of data processing by said processor. The ALU is configured to query the condition code stack for predetermined bit values to determine operations controlled by the ALU.